Bernoulli binary sequences are sequences of bits (e.g., 0's and 1's), in which each bit has a specific probability of being ‘1’, which probability is independent of the value of any other bit in the sequence. Random binary sequences, sometime also loosely referred as “random numbers,” are special cases of Bernoulli sequences in which the probability of any particular bit being ‘1’ is 50%. Random binary sequences may be referred to as pseudo-random when they are calculated from a complex formula based on a seed value. However, the next pseudo-random numbers in a sequence may be predictable if the seed value and formula are known, and they often exhibit at least some degree of correlation. True, uncorrelated, random number can be generated by measuring or observing a physical entropy source which has an unpredictable state. Systems in which the state is based on a quantum mechanical phenomenon are particularly useful for generating random sequences in that the next state of the system is not merely difficult to predict but is unknowable.
A spin-torque transfer (STT) magnetic tunnel junction (MTJ) is an example of a physical entropy source that can exist in one of two binary states and in which switching between the states is probabilistic. STT-MTJ's are thus suitable for use as components of Bernoulli sequence or random number generators. FIGS. 1 and 2 illustrate an STT-MTJ element 100 formed from three layers: a fixed layer 102, a barrier layer 104, and a free layer 106. The fixed layer 102 and the free layer 106 are formed from ferromagnetic materials, and the magnetization direction of the fixed layer 102 is pinned or fixed. This layer may also be referred to as a “reference” layer. The magnetization direction of the free layer 106, on the other hand, can be changed by applying a current to the STT-MTJ element 100 and is switchable between a parallel state in which the magnetization direction of the free layer 106 is parallel to the magnetization direction of the fixed layer 102 and an antiparallel state in which the magnetization direction of the free layer 106 is opposite or antiparallel to the magnetization direction of the fixed layer 102. FIG. 1 shows the STT-MTJ element 100 in an antiparallel state, and FIG. 2 shows the STT-MTJ element 100 in a parallel state. This two-state device is usable as a memory element in which one of the parallel and antiparallel states represents a logical “0” and the other represents a logical “1.”
Data is written into the STT-MTJ element 100 by spin-torque transfer magnetization switching. Applying a current to the STT-MTJ element 100 causes electrons to tunnel through the barrier layer 104 and affect the magnetization direction of the free layer 106. Applying the current in one direction switches the magnetization direction from parallel to antiparallel and reversing the current switches the magnetization state of the free layer 106 from antiparallel to parallel. The STT-MTJ element 100 has a resistance value that depends on the magnetization direction of the free layer 106. Data is read from the STT-MTJ element 100 by causing a small read current to flow through the STT-MTJ element 100 and measuring the resistance of the STT-MTJ 100. The resistance of the STT-MTJ element 100 in the parallel state of FIG. 2 is typically about one half the resistance of the STT-MTJ element 100 in the antiparallel state.
As noted above, the switching of the STT-MTJ element 100 from one state to the other is probabilistic. The probability of the STT-MTJ element 100 switching from one state to the other is based on a combination of the level of voltage or current applied to the STT-MTJ element 100 and the time during which the voltage or current is applied. Thus higher voltages and currents can switch the STT-MTJ element 100 from one state to another in a shorter time than lower voltages or currents, and the longer that a voltage or current is applied, the greater the likelihood that state switching will take place. For discussion herein, it will be assumed that the switching probability is controlled by controlling the time during which a constant voltage (or a constant current) is applied to the STT-MTJ element 100.
FIG. 3 is a graph of the probability of the STT-MTJ element 100 switching from one state to the other based on a time during which a particular switching voltage is applied. The lower line illustrates switching probabilities when a 0.6 volt reference voltage is applied, and the upper line illustrates switching probabilities when a 0.7 volt reference voltage is applied. At either voltage level, there is a very small probability of the STT-MTJ element 100 switching when the voltage is applied for a very short time. The lower line shows that, when 0.6 volts is applied to the STT-MTJ element 100 for longer times, the probability of switching increases, but that even after 100 ns, the probability of the STT-MTJ element 100 switching at 0.6 volts is less than 50%. When 0.7 volts are applied, however, the probability of the STT-MTJ element 100 switching is approximately 50% after about 20 ns. When 0.7 volts are applied for a longer time, the switching probability of the STT-MTJ element 100 becomes very close to 100% after 80 ns. FIG. 3 thus illustrates that for very short time periods, or at low voltage levels, the probability of switching the state of the STT-MTJ element 100 is approximately 0. Thus, the state of the STT-MTJ element 100 can be read by a read voltage that is low enough and/or of short enough duration to avoid switching the state of the STT-MTJ element 100.
A conventional random number generator based on an STT-MTJ element will set the state of the STT-MTJ to either parallel or antiparallel and then apply a signal thereto that has a 50% probability of switching the STT-MTJ element to the opposite state, and the state of the STT-MTJ element will then be measured. If the STT-MTJ element switched states, applying the opposite current will have a 50% chance of returning the element to its starting state. In order to produce a sequence of uncorrelated binary numbers with each bit in the sequence having a specific probability p of being 1 that is applicable to all bits in the sequence thus forming Bernoulli binary sequences with probability p being 1, it is generally necessary to set or reset the STT-MTJ element into a common known state after each attempt at switching or at least after each switching attempt that causes the STT-MTJ element to change states. And, as illustrated in FIG. 3, it takes a higher current and/or a longer time to switch the STT-MTJ element from one state to the other with switching probabilities that approach 100% (a 100% switching probability can only be reached in theory with infinite programming current pulse amplitude and width). Thus, setting or resetting the STT-MTJ element after even half of all measurements consumes a significant amount of power and time. Moreover, due the very nature of probabilistic switching, even after the setting or resetting of STT-MTJ with finite pulse amplitude and width, there is no guarantee that the common known state can be reached, hence jeopardize the prerequisite condition of generating a random sequence with each bit has the same probability p being 1.
Furthermore, it may be difficult if not impossible in practice to ensure that an STT-MTJ switches with exactly 50% probability. For example, process variations in the size or composition of the STT-MTJ or its component parts can cause switching variations in nominally identical STT-MTJ elements. Some applications require a random distribution of one and zeros that is exactly 50%. Fortunately, methods are known for producing series of random bits that have a probability of exactly 50% of being zero or of being one based on a random binary input that is not evenly distributed.
One such method is referred to as a randomness extractor, and one type of randomness extractor is known as a von Neumann extractor. A von Neumann extractor takes as input pairs of bits that are generated in an uncorrelated, random manner but which are not necessarily generated with a probability of 50%, and outputs a stream of bits with a probability of exactly 50% of having a given value. Input pairs that are identical are discarded or ignored. For pairs with different bits, the first bit in the pair is taken as the random number. Thus, for example, the input pairs (0,0) and (1,1) will be discarded, the pair (0,1) will be interpreted as a “0,” and the pair (1,0) will be interpreted as a 1. If the probabilities of generating 1's and 0's are constant, albeit not exactly 50%, the product of the probability of obtaining a 0 and the probability of obtaining a 1 will be constant. Assuming for example, a 60% probability of obtaining a 0 and a 40% probability of obtaining a 1, the probability of obtaining either (0,1) or (1,0) will be 0.6 times 0.4 or 0.24, and this equal probability of each outcome guarantees a 50/50 distribution of 0's and 1's in an output of the extractor.
The use of a randomness extractor reduces the need to set a particular STT-MTJ to output exactly 50% of one bit value or the other. However, for efficiency reasons, it is generally desirable to calibrate the current application time so that each bit is output with about a 50% probability.
There are various electronic and computer related applications in which large numbers of random, uncorrelated, bits are needed at a high bit rate. These include, for example, probabilistic or stochastic computing and various cryptological methods. Random number generation is known to consume significant power, and the high bit rate of random number generation required for such applications consumes power at a rate that may cause heat dissipation problems and drain batteries or other power sources having a limited capacity. It would therefore be desirable to produce Bernoulli sequences more efficiently than conventional methods.